package com.shinbada.modules.sys.company;

import com.shinbada.core.service.CompanyClearService;
import com.shinbada.modules.sys.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author initcap
 * @date Created in 2021/3/20 09:20.
 */
@Service
public class CompanyClearServiceImpl implements CompanyClearService {

    @Autowired
    private UserMapper userMapper;
    @Autowired
    private LogMapper logMapper;
    @Autowired
    private PostMapper postMapper;
    @Autowired
    private SysSettingMapper settingMapper;
    @Autowired
    private RoleMapper roleMapper;
    @Autowired
    private DictValueMapper dictValueMapper;

    @Override
    public void companyClear(String companyId) {
        dictValueMapper.clearCompanyId(companyId);
        roleMapper.clearCompanyId(companyId);
        settingMapper.clearCompanyId(companyId);
        postMapper.clearCompanyId(companyId);
        logMapper.clearCompanyId(companyId);
        userMapper.clearCompanyId(companyId);
    }
}
